import apis from '../../api/apis.js';
export default {
	namespaced: true,
	state: {},
	mutations: {},
	actions: {
		// 获取周围充电桩
		async getAroundchargeStation(context, position) {
			let data = await apis.carCharging.getAroundCharge(position);
			return data;
		},
		// 获取单个充电桩详情
		async getchargeDetail(context, value) {
			let data = await apis.carCharging.getChargeDetail(value);
			return data;
		},
		//获取充电桩评价
		async getchargeJudement(context, id) {
			let data = await apis.carCharging.getchargejudement(id);
			return data;
		},
		//获取两点之间路线连线
		async getPath(context, pathPoint) {
			let data = await apis.carCharging.getpath(pathPoint);
			return data.data.route;
		},
		// 添加充电桩订单
		async addChargeorder(context, orderInfo) {
			let data = await apis.carCharging.addChargeOrder(orderInfo);
			return data;
		},
		//充电结束生成充电桩订单
		async setChargeOrder(context, orders) {
			let data = await apis.carCharging.addnewChargeOrder(orders);
			// console.log("完成的订单", data)
			return data;
		}
	}
}
